package com.dao;

import com.entity.HyOrder;
import org.apache.ibatis.annotations.Mapper;

import java.sql.Timestamp;
import java.util.List;

/**
 * @program: honye-fang
 * @description:
 * @author: Baiyyy
 * @create: 2025-02-14 22:01
 **/
@Mapper
public interface OrderMapper {
    //添加订单
    Integer insertOrder(HyOrder hyOrder);

    //根据订单 ID 查询订单
    HyOrder selectOrderById(Long orderid);

    // 根据用户 ID 查询订单
    List<HyOrder> selectByUserId(Long userId);

    //更新订单状态
    Integer updateOrderStatus(Long orderId, String status);

    //超时订单
    List<HyOrder> selectTimeoutOrders(Timestamp timestamp);
}
